const deepCopy = function (currobj) {
  if (typeof currobj !== 'object') {
    return currobj;
  }
  if (currobj instanceof Array) {
    var newobj = [];
  } else {
    var newobj = {}
  }
  for (var key in currobj) {
    if (typeof currobj[key] !== 'object') {
      // 不是引用类型，则复制值
      newobj[key] = currobj[key];
    } else {
      // 引用类型，则递归遍历复制对象
      newobj[key] = deepCopy(currobj[key])
    }
  }
  return newobj
}


export  {
  deepCopy
}
